1. Field of the Invention
The present invention relates to a membership function generator in a fuzzy hardware system to be applied to a system of control, recognition, decision making, diagnosis or the like.
2. Description of the Related Arts
Conventionally, for example, when a fuzzy inference is performed, a fuzzy set is defined by a membership function, and in order to process this by an electronic means, a membership function generator is used.
FIG. 11 shows a basic circuit structure of an analog membership function generator operated in a voltage mode. This membership function generator circuit includes two differential amplifier circuits D1 and D2.
The differential amplifier circuit D1 includes a pair of transistors Q11 and Q12 and further includes an output circuit having a current mirror circuit structure composed of two transistors Q13 and Q14 connected to the collector path of the transistor Q11 and three resistors R11, R12 and R13 connected thereto. The emitters of the transistors Q11 and Q12 are coupled with each other via a variable resistor R14, and a constant current source Q1 is connected to the connection of the emitter of the transistor Q11 and the variable resistor R14. An input voltage VIN is supplied to the base of the transistor Q11, and a fixed reference voltage VL1 is supplied to the base of the transistor Q12. An output voltage VO1 is obtained at the collector of the transistor Q14.
Now, assuming that a power voltage is Vcc and the resistance values of the resistor R13 and the variable resistor R14 are RL and RE1, respectively, the relationship between the reference voltage VL1 supplied to the base of the transistor Q12 and the output voltage VO1 obtained at the collector of the transistor Q14 is shown in FIG. 12A. First, when the input voltage VIN is less than the reference voltage VL1, the current I.sub.o of the constant current source Q1 separately flows in the transistor Q11 and the transistor Q12 depending on their input voltage ratio. Hence, with the increase of the input voltage VIN, the output voltage VO1 increases at a gradient of RL/RE1. Next, when the input voltage VIN is at least the reference voltage VL1, all the current I.sub.o of the constant current source Q1 flows in the transistor Q11, and thus the output voltage VO1 is saturated at I.sub.o.RL. Such a characteristic is designated an S-type, and a membership function having the S-type characteristic is called an S-type membership function.
The differential amplifier circuit D2 has the same construction as the differential amplifier circuit D1 except that a reference voltage VL2 and the input voltage VIN are conversely given. In this case, a constant current source Q2 is similar to the constant current source Q1. An input/output characteristic of the differential amplifier circuit D2 is shown in FIG. 12B. First, when the input voltage VIN is less than the reference voltage VL2, an output voltage VO2 is saturated at I.sub.o.RL. Next, when the input voltage VIN is at least the reference voltage VL2, with the increase of the input voltage VIN, the output voltage VO2 falls at a gradient of -RL/RE2. This characteristic is a Z-type, and a membership function having the Z-type characteristic is called a Z-type membership function.
In a membership function generator circuit, as shown in FIG. 13, a plurality of above-described differential amplifier circuits D1 and D2 are often used in combination with a minimum value arithmetic circuit Q3. In this case, the minimum value arithmetic circuit Q3 is a circuit which inputs a plurality of input values and outputs the minimum value of them. Hence, when the outputs of the differential amplifier circuits D1 and D2 are the respective S-type and Z-type membership functions, the relationship between the input voltage VIN and an output voltage VO3 in the circuit shown in FIG. 13 becomes a trapezoid, as shown in FIG. 12C. In this case, VL1&lt;VL2. This is called a .pi.-type membership function. This .pi.-type membership function is a membership function most frequently used in a fuzzy system. Further, when VL1=VL2, an output characteristic becomes a triangle, and a triangular membership function can be obtained.
In the .pi.-type membership function, the waveform is the trapezoid, and the height, the base, the left side gradient and the right side gradient of the trapezoid are I.sub.o.RL, VL2-VL1 +(RE1+RE2).I.sub.o, RL/RE1 and -RL/RE2, respectively. In this case, I.sub.o is the current supplied by the constant current sources Q1 and Q2 in the membership function generator circuit.
In the membership function generator circuit, as described above, the first differential amplifier circuit D1 for generating the S-type membership function and the second differential amplifier circuit D2 for generating the Z-type membership function are used and the minimum value of the outputs of both the differential amplifier circuits D1 and D2 is calculated to generate the .pi.-type membership function or the triangular membership function.
In the membership function generator circuit, the two independent differential amplifier circuits D1 and D2 are used and the gradient of the gradient part of each membership function generated by each differential amplifier circuit depends on the emitter resistor RE1 or RE2 of each differential amplifier circuit. Hence, when the emitter resistors RE1 and RE2 are different from each other, the gradients of the gradient parts of the differential amplifier circuits are different from each other. Thus, when the .pi.-type membership function or the triangular membership function is generated on the basis of the outputs of the differential amplifier circuits D1 and D2, the gadients of both the sides of the trapezoid or the triangle are different from each other.
On the other hand, as the membership function used in the fuzzy system, a membership function symmetrical on the left and right sides or about a vertical line is an overwhelming majority. Hence, in the conventional membership function circuit, by adjusting the emitter resistors so that RE1=RE2, the gradients of both the sides are made equal to with each other to obtain a symmetrical membership function on the left and right sides. However, an operation for adjusting the values of the emitter resistors RE1 and RE2 for every circuit requires much labor and time, and this adjustment is very troublesome.
Further, when the conditions and characteristics of the operation of the differential amplifier circuits are all equal, it is considered to prepare and use the emitter resistors having an equal value. Actually, there is variation in the operational conditions and characteristics of the differential amplifier circuits. Therefore, in order to use the emitter resistors having an equal value, a quite troublesome adjustment of the differential amplifiers is required.
For example, in the membership function generator circuit shown in FIG. 11, when the resistance value RL of the resistor R13 of the differential amplifier circuit D1 is offset, as shown in FIG. 14, the height (I.sub.o.RL') of the S-type membership function (output voltage VO1) generated in the differential amplifier circuit D1 becomes different from the height (I.sub.o.RL) of the Z-type membership function (output voltage VO2) generated in the differential amplifier circuit D2, where RL' is the offset value of the resistor R13 of the differential amplifier circuit D1. Accordingly, when the .pi.-type membership function is produced from the S-type membership function and the Z-type membership function, as shown by a thick line in FIG. 14, the gradients of both the sides of the .pi.-type membership function are different from each other and a vertex position is moved from the original position VL2 to a new position VL2'. As a result, the length of the right side in the transverse direction is changed to I.sub.o.RE2.(RL'/RL). Thus, even when the emitter resistors are adjusted so that RE1=RE2, the obtained trapezoid is asymmetrical on the left and right sides and hence a membership function having the desired form can not be obtained.
Further, when the value RL is externally adjustable, it is sufficient to perform a readjustment so as to be RL'=RL. However, for instance, in the case of the differential amplifier circuits produced in an IC circuit form, the readjustment can not be carried out.
When the value RL is not externally adjustable, it is necessary to adjust either the value RE1 or RE2 so that the trapezoid may be symmetrical on the left and right sides. In this case, the position shift occurs in the right side vertex P of the .pi.-type membership function, and thus it is necessary to correct this position shift by changing VL2.
In many conventional cases, it is also required to adjust the parameters other than the emitter resistors RE1 and RE2, and it is troublesome to obtain the desired membership function.